import {post,deletes} from '@/utils/request/http'
import type { ICategoryParams, IAddCategoryParams } from '@/types/category'

// 获取分类列表
export const getCategoryList = async(params: ICategoryParams) => {
    let res = await post('/category/list', params)
    return res
    
    
}
// 删除分类
export const deleteCategory = async(id: string) => {
    let res = await deletes('/category/delete', {id})
    return res
}
// 添加分类
export const addCategory = async(data: IAddCategoryParams) => {
    let res = await post('/category/add', data)
    return res
}
